import request from '@/utils/request'

const api_name = '/admin/activity/couponInfo'
import {call} from "@/utils/rpc";
export default {

  getPageList(page, limit) {
    return call("admin/activity/couponInfo/list",{page,limit})
  },
  getById(id) {
    return call("admin/activity/couponInfo/getById",{_id:id})
  },

  save(role) {
    return call("admin/activity/couponInfo/save",role)
  },

  updateById(role) {
    return call("admin/activity/couponInfo/edit",role)
  },
  removeById(id) {
    return call("admin/activity/couponInfo/delete",[id])
  },
  removeRows(idList) {
    return call("admin/activity/couponInfo/delete",idList)
  },

  findCouponRuleList(id) {
    return call("admin/activity/couponInfo/findCouponRuleList",{_id:id})
  },
  saveCouponRule(rule) {
    return call("admin/activity/couponInfo/saveCouponRule",rule)
  },

  findCouponByKeyword(keyword) {
    return call("admin/activity/couponInfo/findCouponByKeyword",{keyword})
  }
}
